<?php
include($_SERVER["DOCUMENT_ROOT"] . "/product/model.php");
include($_SERVER["DOCUMENT_ROOT"] . "/product/view.php");
include($_SERVER["DOCUMENT_ROOT"] . "/type/controller.php");

$content_left_column = controller_product_type_on_request();

$product_id = NULL;

if (array_key_exists("id", $_GET))
{
	$product_id = $_GET["id"];
}

$product_details = model_get_product_details($product_id);

if (model_upate_product_details($product_id) == true)
{
	$product_details["click_count"] = $product_details["click_count"] + 1;
}

$content_center_column = view_product_detail($product_details["big_image"], $product_details["name"], $product_details["model"], $product_details["specification"], $product_details["market_price"], $product_details["promotional_price"], $product_details["intro"], $product_details["details"], $product_details["publish_time"], $product_details["click_count"]);

$content_right_column = "";

include($_SERVER["DOCUMENT_ROOT"] . "/template/layout.php");
?>
